package code;

public abstract class Action {
	
	public abstract boolean isFinished();
	public abstract boolean isReady();
	public boolean isInProgress() {
		return this.isFinished() ? false : !this.isReady();
	}
	public void doStep()throws ActionFinishedException{
		if(this.isFinished()) throw new ActionFinishedException();
		else this.realDoStep();
		
	}
	protected abstract void realDoStep();
	
}
